/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.winni.Controller;

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author Sushant
 */
@WebServlet(name = "viewItemServlet", urlPatterns = {"/viewItemServlet"})
public class viewItemServlet extends HttpServlet {

    /**
     * Processes requests for both HTTP <code>GET</code> and <code>POST</code>
     * methods.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
     protected void service(HttpServletRequest req,HttpServletResponse res)
        throws IOException,ServletException{
	System.out.println("service()");
        String id=req.getParameter("id");
        
        //2.process 
	//store in db
	String msg="Your Enquiry Has been added successfully";
        
        PrintWriter out=res.getWriter();
	out.println("<h1>Dhawala Online Solutions Private Limited</h1>");
	out.println("<h1>"+msg+"</h1>");
       out.println("<h1>Email ID:"+id);
	System.out.println("destroy()");
}
        }
    


